# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>

_realname=clustal-omega
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.2.4
pkgrel=1
pkgdesc="Fast, scalable generation multiple sequence alignments (mingw-w64)"
arch=('any')
license=("custom")
url="http://www.clustal.org/omega"
source=("http://www.clustal.org/omega/${_realname}-${pkgver}.tar.gz")
sha256sums=('8683d2286d663a46412c12a0c789e755e7fd77088fb3bc0342bb71667f05a3ee')
depends=("${MINGW_PACKAGE_PREFIX}-argtable")
makedepends=("automake"
             "autoconf"
             "${MINGW_PACKAGE_PREFIX}-gcc")

options=('staticlibs' 'strip')

build() {
  [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}
  cp -Rf ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${MINGW_CHOST}
  cd ${srcdir}/build-${MINGW_CHOST}
  CPPFLAGS="-DSRE_STRICT_ANSI" \
  ./configure \
    --prefix=${MINGW_PREFIX} \
    --build=${MINGW_CHOST} \
    --host=${MINGW_CHOST} \
    --target=${MINGW_CHOST} \
    --enable-static \
    --enable-shared

  make
}

package() {
  cd "${srcdir}/build-${MINGW_CHOST}"
  make DESTDIR="${pkgdir}" install
}
